<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>所有招聘的职位</title>
<link rel="stylesheet" href="<%=request.getContextPath() %>/static/common/dist/css/bootstrap.min.css">
</head>
<body>
	<c:if test="${talent==null }">
		<a href="<%=request.getContextPath()%>/view/talent/talent-register.jsp">求职者注册</a>&nbsp;
		<a href="<%=request.getContextPath()%>/view/talent/talent-login.jsp">求职者登录</a>&nbsp;
	</c:if>
	<c:if test="${talent!=null}">
		<a href="<%=request.getContextPath()%>/TalentServlet?command=main">个人中心</a>&nbsp;
	</c:if>
	<c:if test="${company==null }">
		<a href="<%=request.getContextPath()%>/view/company/company-register.jsp">企业注册</a>&nbsp;
		<a href="<%=request.getContextPath()%>/view/company/company-login.jsp">企业登录</a>
	</c:if>
	<c:if test="${company!=null }">
		<a href="<%=request.getContextPath()%>/CompanyServlet?command=main">企业首页</a>
	</c:if>
	<hr>
	<center><h1>最近招聘职位</h1></center>
	<hr>
	<div style="width:800px;margin:0 auto">
		<c:forEach items="${positionList }" var="position">
		<div class="panel panel-info" style="margin-bottom:20px">
	      <div class="panel-heading">
	        <h3 class="panel-title">${position.companyName } &nbsp;&nbsp;&nbsp;&nbsp;"${position.companySlogan }"</h3>
	      </div>
	      <div class="panel-body">
	        <a href="<%=request.getContextPath()%>/PositionServlet?command=detail&id=${position.id}">${position.name }</a>
	        &nbsp;&nbsp;${position.salary1 }-${position.salary2 }
	        &nbsp;&nbsp;${position.companyAddress }　　
	        &nbsp;&nbsp;<fmt:formatDate value="${position.releaseTime }" pattern="yyyy-MM-dd"/>
	      </div>
	    </div>	 　　　　 
		</c:forEach>
	</div>
		<script src="<%=request.getContextPath() %>/static/common/jquery.min.js"></script>
		<script src="<%=request.getContextPath() %>/static/common/dist/js/bootstrap.min.js"></script>
</body>
</html>